1. Field of the Invention
The present invention relates to a method, system, program, and data structures for enabling a controller receiving a request for data in a first format to handle I/O requests for data in a second format.
2. Description of the Related Art
Many mass storage devices, such as a Direct Access Storage Device (DASD), store data in a Count-Key-Data (xe2x80x9cCKDxe2x80x9d) data format. A count field provides the name and format of a record, the key length, and the data length. The key field, which is optional, is used for searching and may indicate the last data set in the record. The data field provides a variable length record of user data sets. The number of CKD records that can be placed on a track depends on the length of the data areas of the records. Systems that store data in a CKD format often utilize a high-end storage controller device to interface between an application or host system and the DASD, such as the International Business Machines Corporation (IBM) 3990 and Enterprise System Storage Server.**
The fixed block architecture (FBA) data storage format stores data in blocks of a fixed size. These blocks are addressed by a block number relative to the beginning of the file. An FBA block is referred to as a sector, which is addressable by the host. The FBA data storage format is the ubiquitous data storage format used in most personal computer and server storage devices. FBA data is accessed by devices and controllers using the Small Computer System Interface (SCSI). Because of the prevalence of SCSI/FBA systems, there are a greater range of low to middle end server machines that utilize the SCSI FBA format than high end machines maintaining data in the CKD format.
The prior art provides systems for emulating the CKD format on FBA devices and for converting CKD formatted records to the FBA format. Such systems are disclosed and discussed in U.S. Pat. Nos. 5,535,372 and 6,041,386, which are assigned to IBM, the assignee of the present application, and are incorporated herein by reference in its entirety. Still further, data in the CKD format is typically written and imposed onto the fixed blocks of an FBA device, as discussed in U.S. Pat. Nos. 5,535,372 and 5,664,144. In such case, the data area of a CKD record can span multiple fixed blocks or sectors in the FBA device. U.S. Pat. No. 5,664,144 to Moshe Yanai et al. is assigned to EMC corporation, and is incorporated herein by reference in its entirety.
Notwithstanding that CKD data can be stored on FBA devices, additional specialized hardware needs to be provided to allow a SCSI device to handle CKD data.
Thus, there is a need in the art for an improved technique for enabling a SCSI FBA device handle CKD data.
To overcome the limitations in the prior art described above, preferred embodiments disclose a system, method, program, and data structure for processing a request for data in a first format that is superimposed on blocks of data stored in a second format in a storage device. A data structure for a storage unit in the first format including the requested data is accessed. There is one data structure for each storage unit in the first format being accessed. Further, at least one cache page storing blocks of data in the second format is needed to store one storage unit in the first format. A determination is made of one or more storage blocks in the second format that include the requested data. A determination is also made as to whether the storage unit data structure includes a pointer to a control block for a cache page that would include the determined storage blocks in the second format. The determined pointer and a request for the determined storage blocks is transferred to a component that is capable of accessing storage blocks in the second format in cache using the control block if the storage unit data structure includes a pointer to the control block.
In certain embodiments, the first format comprises a count-key-data (CKD) format and the second format comprises the Small Computer System Interface (SCSI) format.
In further embodiments, the component capable of accessing storage blocks in the cache comprises a cache manager. In such case, a request for the determined storage blocks are transferred to the cache manager if the storage unit data structure does not include a pointer to the control block. The cache manager accesses the control block for the cache page that includes the requested data and uses the accessed control block to access the requested storage blocks from the cache page. The cache manager returns the accessed storage blocks.
Still further, the cache manger returns one pointer to the accessed control block providing information on the cache page including the requested data. The returned pointer is received and indication of the returned pointer is made in the storage unit data structure for subsequent use when subsequently accessing requested data in the first format in the page.
Preferred embodiments provide a technique for adding a layer of execution over a controller or current cache manager that handles data in a second format, such as SCSI, to handle I/O requests for data in a first format, such as the CKD format. With the preferred embodiments, the extra layer of code that provides the interface to the first data or CKD format uses the cache manager of the existing controller. In this way, a patch of code can be applied to current controllers managing data in a common data format, such as SCSI, to enable the controller to handle I/O requests to data in a different storage format, such as CKD.